<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("miniglider", $con);
$dateTime = date("Y-m-d",strtotime("-1 day"));

mysql_query("DELETE FROM miniglider_query WHERE firstlogin< '2012-05-20' or firstlogin >'$dateTime'");
mysql_query("DELETE FROM miniglider_query WHERE dataTime< '2012-05-20' or dataTime >'$dateTime'");
mysql_close($con);
?>